// 变量定义
:root {
  // 主色调
  --primary-color: #4CAF50;
  --primary-light: #81C784;
  --primary-dark: #388E3C;
  
  // 自然色调
  --earth-brown: #8D6E63;
  --grass-green: #66BB6A;
  --sky-blue: #64B5F6;
  --sun-yellow: #FFD54F;
  
  // 中性色调
  --text-primary: #2C3E50;
  --text-secondary: #546E7A;
  --text-light: #90A4AE;
  --background-light: #F5F5F5;
  --background-dark: #263238;
  
  // 边框和阴影
  --border-color: #E0E0E0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  
  // 圆角
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

// 重置样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background-light);
}

// 通用容器
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

// 乡村田园风格装饰元素
.rustic-border {
  position: relative;
  padding: 20px;
  border: 2px solid var(--earth-brown);
  border-radius: var(--radius-md);
  background: white;
  
  &::before,
  &::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--earth-brown);
    border-radius: 50%;
  }
  
  &::before {
    top: -10px;
    left: -10px;
  }
  
  &::after {
    bottom: -10px;
    right: -10px;
  }
}

.leaf-decoration {
  position: relative;
  padding: 20px;
  
  &::before,
  &::after {
    content: '🌿';
    position: absolute;
    font-size: 24px;
  }
  
  &::before {
    top: -10px;
    left: -10px;
    transform: rotate(-45deg);
  }
  
  &::after {
    bottom: -10px;
    right: -10px;
    transform: rotate(135deg);
  }
}

// 按钮样式
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
  
  &-primary {
    background: var(--primary-color);
    color: white;
    
    &:hover {
      background: var(--primary-dark);
      transform: translateY(-2px);
    }
  }
  
  &-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    
    &:hover {
      background: var(--primary-color);
      color: white;
      transform: translateY(-2px);
    }
  }
  
  &-natural {
    background: var(--earth-brown);
    color: white;
    
    &:hover {
      background: var(--primary-dark);
      transform: translateY(-2px);
    }
  }
}

// 卡片样式
.card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
  
  &:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
  }
}

// 视频卡片特殊样式
.video-card {
  @extend .card;
  
  .thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; // 16:9 aspect ratio
    overflow: hidden;
    
    img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }
    
    &:hover img {
      transform: scale(1.05);
    }
  }
}

// 动画
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

// 响应式布局
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .btn {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
  }
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: var(--radius-full);
  
  &:hover {
    background: var(--text-secondary);
  }
}

// 过渡动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-fade-enter-active,
.slide-fade-leave-active {
  transition: all 0.3s ease;
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(20px);
  opacity: 0;
}

// 工具类
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

// 乡村田园风格背景图案
.rustic-bg {
  background-image: url('@/assets/images/patterns/rustic-pattern.png');
  background-repeat: repeat;
  background-size: 200px;
  opacity: 0.1;
}

.natural-bg {
  background: linear-gradient(135deg, var(--grass-green) 0%, var(--sky-blue) 100%);
  opacity: 0.1;
} 